//
//  ImageView.m
//  UI-03homeWork
//
//  Created by 402030900@qq.com on 16/7/18.
//  Copyright © 2016年 402030900@qq.com. All rights reserved.
//

#import "ImageView.h"

@implementation ImageView
- (instancetype)initWithFrame:(CGRect)frame image:(UIImage *)image target:(nonnull id)target action:(nonnull SEL)action {
    self = [super initWithFrame:frame];
    if (self) {
        self.image = image;
        self.userInteractionEnabled = YES;
        UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc]initWithTarget:target action:action];
        [self addGestureRecognizer:tap];
    }
    return self;
}


@end
